package com.wens.monitor.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateParm {
	private int year;
	private int month;
	private int day;
	
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	
	public Date getDate() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date date = null;
		try {
			System.out.println("test!!=="+ year+ "-" + month + "-" + day);
			date = sdf.parse(year+ "-" + month + "-" + day);
		} catch (ParseException e) {
			System.out.println("date formate error");
			e.printStackTrace();
		}
		return date;
	}
}
